package com.mycompany.j2eem.service.ghyservice;

import com.mycompany.j2eem.Mapper.ghymapper.TagMapper;
import org.springframework.beans.factory.annotation.Autowired;

public class TagService {
    String tag1="动漫";
    String tag2="风景";

    @Autowired
    TagMapper tagMapper;

    //获取Account_id
    private String get_Account_id(String username){
        String Account_id = tagMapper.get_Account_id(username);
        return Account_id;
    }
    //获取该用户点赞的图片
    private String get_Like_Picture(String pid){
        String Picture_id=tagMapper.get_Like_Picture(pid);
        return Picture_id;
    }
    //计算该图片的点赞次数
    private int count_Like_Picture(String[] pictures){
        int like_count=0;

        for(int i=0;i<pictures.length;i++){
            //like_count+=tagService.get_Like_Picture();
        }
        return like_count;
    }
    //判断该标签是否存在
    private boolean isExist_tag(String tagname){
        if(true){return true;}
        else return false;
    }
    //根据字符返回可能存在的标签
    private String exist_tag(String tagname){
        if(isExist_tag(tagname)){
            return tagMapper.get_tag_id(tagname);
        }else{
            return "911";
        }

    }
}
